package net.huashitong.Project.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;

import net.huashitong.Project.entity.ProIndustryType;

@Repository
public class ProIndustryTypeDao extends StringDao<ProIndustryType> {
	
	public ProIndustryType queryByTypeCode(String typeCode){
		GenericQuery query = createQuery("obj");
		query.append(" and obj.typeCode=:typeCode").setParam("typeCode", typeCode);
		return query.firstResult();
	}
	
	public  List<ProIndustryType> queryByType(String type){
		GenericQuery query = createQuery("obj");
		query.append(" and obj.type=:type").setParam("type", type);
		return query.listResult();
	}

}
